<template>
  <div id="container">
    <transition name=".el-zoom-in-center">
      <el-result v-if="succ" icon="success" title="加入成功" subTitle="您已成功加入队伍">
        <template slot="extra">
          <el-button type="primary" size="medium" @click="$router.push('/')">返回</el-button>
        </template>
      </el-result>
      <el-result v-else icon="info" title="接收邀请中" subTitle="正在确认邀请信息">
        <template slot="extra">
        </template>
      </el-result>
    </transition>
  </div>
</template>
<script>
export default {


  data() {
    return {
      token: '',
      succ: false,
    }
  },

  created() {
    this.token = this.$route.query.token
    this.sendInviteConfirm()
  },
  methods: {
    sendInviteConfirm() {
      let _this = this
      this.$axios.get(`${this.HOST}/activity/sign/invite/accept`, {
        params: {
          token: this.token
        }
      }).then(res => {
        if (res.data.code === 200)
          _this.succ = true;
      })
    }
  }
}
</script>

<style lang="less" scoped>


</style>
